package com.woniuxy.userassembly.service.impl;

import com.woniuxy.userassembly.model.RbacPermission;
import com.woniuxy.userassembly.dao.RbacPermissionMapper;
import com.woniuxy.userassembly.service.IRbacPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Liyfi
 * @since 2021-05-22
 */
@Service
public class RbacPermissionServiceImpl extends ServiceImpl<RbacPermissionMapper, RbacPermission> implements IRbacPermissionService {
    @Autowired
    private RbacPermissionMapper mapper;
    @Override
    public int addPermission(RbacPermission permission) {
        int i = mapper.addPermission(permission);
        return i;
    }

    @Override
    public RbacPermission selPermission(int permissionId) {
        RbacPermission rbacPermission = mapper.selPermission(permissionId);
        return rbacPermission;
    }

    @Override
    public int removePermission(int permissionId) {
        int i = mapper.removePermission(permissionId);
        return i;
    }

    @Override
    public int updatePermissionName(RbacPermission permission) {
        int i = mapper.updatePermissionName(permission);
        return i;
    }
}
